<template>
  <div class="main-database">
    <div class="page-database">
      <div class="page-database-header">
        <div class="head-title">
          <div class="head-left">题库练习</div>
          <div class="head-right">练习报告</div>
        </div>
      </div>
      <div class="page-database-body">
        <div class="page-database-center">
          <div class="center-header">
            <van-row>
              <van-col span="8"
                >今日刷题
                <p><span class="td">20</span>题</p>
              </van-col>
              <van-col span="8"
                >累计刷题
                <p><span class="td">200</span>题</p>
              </van-col>
              <van-col span="8"
                >正确率
                <p><span class="td">85</span>%</p></van-col
              >
            </van-row>
          </div>
          <div class="page-main">
            <h4>每日一练</h4>
              <div class="main-title">
                <router-link to="/drill">
                <div>
                  <p>
                    input元素的type属性的取值可以是( )
                    <span class="main-title-right"
                      >更多<van-icon name="arrow"
                    /></span>
                  </p>
                  <p>
                    <span>A.image</span>&ensp; 
                    <span>B.checkbox</span>&ensp;
                    <span>C.button</span>&ensp;
                    <span>D.select</span>
                  </p>
                </div> 
              </router-link>
                <div class="main-title-bottom">
                  难度:<van-rate v-model="value" allow-half />
                  <span class="main-title-bottom-txt">答题</span>
                </div>
              </div>
           
            <h4>做题回顾</h4>
            <div class="page-sec">
              <van-row gutter="20">
                <van-col span="8"
                  ><div class="th1">
                    <h4>做题记录</h4>
                    温故而知新
                  </div></van-col
                >
                <van-col span="8"
                  ><div class="th2">
                    <h4>错题本</h4>
                    错题汇集反思
                  </div></van-col
                >
                <van-col span="8"
                  ><div class="th3">
                    <h4>我的收藏</h4>
                    好题收藏练习
                  </div></van-col
                >
              </van-row>
            </div>
            <van-button type="warning" block
              ><van-icon name="add-o" />快来定义个性题库吧</van-button
            >
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default { name: "database" };
</script>
<script setup>
import { ref } from "vue";
const value = ref(2.5);
</script>
<style lang="scss" scoped>
.main-database {
  height: 100%;
  overflow-y: auto;
}
.page-database {
  height: 100%;
  &-header {
    width: 100%;
    height: 200px;
    background-color: orange;
    .head-title {
      display: flex;
      justify-content: space-between;
      .head-left,
      .head-right {
        margin: 20px;
        color: #fff;
      }
    }
  }
  &-body {
    width: 100%;
    height: 100%;
  }
  &-center {
    width: 100%;
    height: 100%;
    background-color: #fff;
    margin-top: -50px;
    border: 1px solid #fff;
    border-radius: 30px;
    .center-header {
      margin-top: -40px;
      margin-left: 5%;
      height: 100px;
      width: 90%;
      background-color: #fff;
      border: 1px solid #999999;
      border-radius: 10px;
      text-align: center;
      box-sizing: border-box;
      padding: 20px;
      .td {
        color: orange;
        font-weight: bold;
        font-size: 20px;
      }
    }
    .page-main {
      margin: 10px;
      .main-title {
        height: 132px;
        width: 100%;
        background-color: pink;
        border: 1px solid pink;
        border-radius: 10px;
        padding-left: 10px;
        box-sizing: border-box;
        position: relative;
        color: #000;
        &-right {
          position: absolute;
          right: 10px;
        }
        &-bottom {
          position: absolute;
          bottom: 10px;
          &-txt {
            position: absolute;
            right: -170px;
            background-color: orange;
            color: #fff;
            width: 50px;
            line-height: 20px;
            display: block;
            bottom: 1px;
            text-align: center;
            border-radius: 15px;
            font-size: 12px;
          }
        }
      }
      .page-sec {
        .van-col {
          font-size: 16px;
          div {
            border: 1px solid #fff;
            text-align: center;
            padding-bottom: 10px;
            border-radius: 10px;
            opacity: 0.5;
            color: #fff;
          }
          .th1 {
            background-color: #0066ff;
          }
          .th2 {
            background-color: #00ffff;
          }
          .th3 {
            background-color: orangered;
          }
        }
      }
      .van-button {
        margin: 30px 0 0 0;
        width: 100%;
        border-radius: 25px;
        color: #fff;
      }
    }
  }
}
</style>
